package com.anycc.cloud.core.service;

import com.anycc.cloud.common.dto.query.PagingRequest;
import com.anycc.cloud.common.dto.query.PagingResponse;
import com.anycc.cloud.core.entity.Account;

/**
 * Account service
 */
public interface AccountService {

    /**
     * 账户创建
     *
     * @param account         账户
     * @param confirmPassword 密码
     * @return account
     */
    Account create(Account account, String confirmPassword);

    /**
     * 删除账户
     *
     * @param id 账户id
     */
    void delete(String id);

    /**
     * find account by username
     *
     * @param username username
     * @return account
     */
    Account findByUsername(String username);

    /**
     * +
     * update account
     *
     * @param account account
     * @return Account
     */
    Account update(Account account);

    /**
     * paging query
     *
     * @param account       account
     * @param pagingRequest paging param
     * @return PagingResponse
     */
    PagingResponse<Account> findByPaging(Account account, PagingRequest pagingRequest);

    /**
     * find account by id
     *
     * @param id account id
     * @return account
     */
    Account findById(String id);

    /**
     * delete role of account
     * @param roleId roleId
     */
    void deleteRole(String roleId);

}
